<template>
  <div class="dashboard">
    <div class="header">
      <div class="title-container">
        <h1 class="analytics-title">基于Hive的NBA比赛数据分析与可视化</h1>
      </div>
      <div class="nav-buttons">
        <button @click="$router.push('/index/one')" style="background-color: #68eecd">可视化大屏</button>
        <button @click="$router.push('/index/two')" style="background-color: #e590d7">可视化大屏</button>
        <button @click="$router.push('/index/three')" style="background-color: #e9a5a5">综合大屏</button>
      </div>
    </div>
    <div class="router-container">
<!--      路由-->
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "SeismIndex",
};
</script>

<style scoped>

.title-container {
  text-align: center;
  padding: 2rem;
  //background: #f8f9fa;
}

.analytics-title {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, #1a237e, #d32f2f, #ff9800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  position: relative;
  display: inline-block;
  letter-spacing: 1.5px;
  transition: transform 0.3s ease;
}

.analytics-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2196F3, transparent);
}

.analytics-title:hover {
  transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .analytics-title {
    font-size: 2rem;
  }
}
.dashboard {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to right, #e9b7b7, #68eecd);
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden; /* 防止超出 */
}

.header {
  flex: 0 0 60px; /* 固定高度，避免撑开 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: white;
}

.nav-buttons button {
  margin-left: 10px;
  padding: 8px 16px;
  //background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  /* 基础样式 */
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  //background: radial-gradient(circle at 30% 30%, #4dabf7, #1971c2, #1864ab);
  cursor: pointer;
  transition: all 0.3s ease;

  /* 文字样式 */
  color: white;
  font-family: Arial, sans-serif;
  font-size: 1.2em;
  font-weight: bold;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);

  /* 立体阴影 */
  box-shadow:
      0 15px 30px rgba(0,100,200,0.3),
      inset 0 -5px 15px rgba(0,0,0,0.3),
      inset 0 5px 10px rgba(255,255,255,0.3);
}

/* 悬停效果 */
.blue-sphere-btn:hover {
  transform: scale(1.05);
  box-shadow:
      0 20px 40px rgba(0,100,200,0.4),
      inset 0 -5px 15px rgba(0,0,0,0.3),
      inset 0 5px 10px rgba(255,255,255,0.3);
}

/* 点击效果 */
.blue-sphere-btn:active {
  transform: scale(0.95) translateY(2px);
  box-shadow:
      0 5px 15px rgba(0,100,200,0.2),
      inset 0 -3px 10px rgba(0,0,0,0.3),
      inset 0 3px 5px rgba(255,255,255,0.3);
}
/* 可选：添加光泽效果 */
.nav-buttons ::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle at 50% 50%,
  rgba(255,255,255,0.8) 10%,
  rgba(255,255,255,0) 70%);
  border-radius: 50%;
}
.nav-buttons button:hover {
  background-color: #2980b9;
}

/* 让 <router-view> 占满剩余空间，防止超出 */
.router-container {
  //flex: 1;
  //overflow: auto; /* 允许滚动，防止内容超出 */
  //display: flex;
  //flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;  /* 关键！防止内容溢出 */
  margin: 0;         /* 清除默认边距 */
}
</style>

